home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / games / IndiZone / oort / text.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.0 KB  |  72 lines

  1. /*
  2.  * Copyright (C) 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. /*------------------------------------------------------------------------------
  18.  *
  19.  * OORT - text.h - Header for text drawing routines.
  20.  *
  21.  * $Id: text.h,v 1.2 1994/01/28 00:22:01 mtj Exp $
  22.  * 
  23.  * Chris Fouts - May, 1993.
  24.  * 
  25.  *----------------------------------------------------------------------------*/
  26.  
  27. #ifndef    OORT_TEXT_H
  28. #define    OORT_TEXT_H
  29.  
  30. typedef void (*FontDrawFunc)( short * ) ;
  31.  
  32. typedef struct {
  33.     long        heightUp ;
  34.     long        heightLo ;
  35.     float        scale ;
  36.     FontDrawFunc    draw ;
  37.     short        *widths ;
  38.     short        *offsets ;
  39.     short        *data ;
  40.     short        type ;
  41.     short        minChar ;
  42.     short        maxChar ;
  43.     } GeoFont ;
  44.  
  45.  
  46.  
  47. #define    OORT_FONT    0x4f6f6e74    /* Magic = Oont */
  48.  
  49. #define    BGNTMESH    (1)
  50. #define    SWAPTMESH    (2)
  51. #define    ENDBGNTMESH    (3)
  52. #define    RETENDTMESH    (4)
  53. #define    RETTMESH    (5)
  54.  
  55. #define    BGNLOOP        (1)
  56. #define    ENDBGNLOOP    (2)
  57. #define    RETENDLOOP    (3)
  58. #define    RETLOOP        (4)
  59.  
  60. /* BEGIN PROTOTYPES text.c */
  61. GeoFont *   copyFont( GeoFont *src ) ;
  62. void        drawString( GeoFont *gf, char *str ) ;
  63. float       getFontSize( GeoFont *gf ) ;
  64. float       getStrWidth( GeoFont *gf, char *str ) ;
  65. GeoFont *   loadFont( char *name ) ;
  66. int         maxCharsInWidth( GeoFont *gf, char *str, float width ) ;
  67. void        positionText( float x, float y ) ;
  68. void        setFontSize( GeoFont *gf, float size ) ;
  69. /* END PROTOTYPES text.c */
  70.  
  71. #endif /* OORT_TEXT_H */
  72.